package p.ithorns.sample.office.excel;

import java.util.ArrayList;
import java.util.List;

/**
 * Excel头节点模型
 *
 * @author HtL
 * @date 2024/8/29 15:31
 * @since 1.0.0
 */
public class HeaderNode {
    /**
     * 层级/行号
     */
    private int level;
    /**
     * 索引/列号
     */
    private int index;
    /**
     * 头名称/列名
     */
    private String name;
    /**
     * 子节点
     */
    private List<HeaderNode> children;

    public HeaderNode() {}

    public HeaderNode(String name) {
        this.name = name;
        this.children = new ArrayList<>();
    }

    public HeaderNode(int level, int index, String name) {
        this(name);
        this.level = level;
        this.index = index;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<HeaderNode> getChildren() {
        return children;
    }

    public void setChildren(List<HeaderNode> children) {
        this.children = children;
    }
}